home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Source Code / C / Snippets / Up⁄Down Arrows / ReadMe! < prev    next >
Encoding:
Text File  |  1994-03-05  |  1.9 KB  |  45 lines  |  [TEXT/EDIT]

  1. ---------------------------------------------------------------------
  2. Note:  The two "Tweak" versions were done by Ken Long.
  3. The only modifications to the source were the addition of many more
  4. comments, and the change of resource ID numbers.  The modifications
  5. to the resource file were the addition of 'PICT', 'DITL' and 'DLOG'
  6. resources to facititate the two color arrow sets.  Everything
  7. else is the same.
  8.  
  9. Think C 5.0.4 guys: Just add MacTraps and MacTraps2 and whichever
  10. .c file you want to run.
  11. ---------------------------------------------------------------------
  12.  
  13. From: egurney@vcd.hp.com (Eddy J. Gurney) 
  14. Subject: UpDownArrowTester Source 
  15. Date: Fri, 4 Mar 1994
  16.  
  17. Here's an old program of mine that I wrote when I was first
  18. learning to program the Mac. It attempts to implement the "up/down
  19. arrow bumpers" commonly seen in the ColorPicker dialog. It's
  20. written completely as part of the event handler, so it's not a
  21. nice little compact CDEF or anything. It uses three PICT resources
  22. to represent the "off", "up" and "down" states, and features
  23. variable speed increment/decrement (ie., the longer you hold it
  24. down, the faster it goes, just like the ColorPicker, which as I
  25. said, I was using as a model.)
  26.  
  27. I'm not claiming this is the right way to do it (probably far from
  28. it!) but at least it's a start.  If anyone makes improvements,
  29. etc. let me know.  (I don't care about any bugs in the "Tester"
  30. portion of the code, just the part that handles the up/down
  31. arrows, which is all I really cared about testing!)
  32.  
  33. If someone has a better implementation, I'd love to see it.
  34.  
  35. Regards, Eddy
  36.  
  37. -- Eddy J. Gurney N8FPW    Hewlett-Packard Company, Vancouver
  38. (USA!) Division egurney@vcd.hp.com                        
  39. #include <standard-disclaimer.h>
  40. "Failures are divided into two classes--
  41. those who thought and  never did, 
  42. and those who did and never thought."                          
  43.                         John Charles Salak
  44.  
  45.